import request from '../utils/request.js'
/* 登录API */
//get为params post为data
export const userLoginApi = (data) => {
	return request({
		method: 'POST',
		url: '/login',
		data: data
	})
}
/* 注册API */

export const userRegisterApi = (data) => {
	return request({
		method: 'POST',
		url: '/register',
		data: data
	})
}


/* 用户详情API */
export const userDeatilByIdApi = (id) => {
	return request({
		method: 'GET',
		url: `/user/${id}`		
	})
}

/* 编辑用户详情 */
export const userUpdateByIdApi = (id , data) => {
	return request({
		method: 'POST',
		url: `/user_update/${id}`,
		data
		
	})
}


/* 关注用户 */
export const userFllowApi = (id) => {
	return request({
		method: 'GET',
		url: `/user_follows/${id}`		
	})
}


/* 取消关注用户 */
export const userunFllowApi = (id) => {
	return request({
		method: 'GET',
		url: `/user_unfollow/${id}`		
	})
}


/* 关注列表 */
export const fllowListApi = () => {
	return request({
		method: 'GET',
		url: '/user_follows'	
	})
}


/* 收藏列表 */
export const collectListApi = () => {
	return request({
		method: 'GET',
		url: '/user_star'	
	})
}


/* 用户评论 */
export const userCommentsListApi = () => {
	return request({
		method: 'GET',
		url: '/user_comments'	
	})
}
